package com.example.dishit.model.editpref;

public class PreferenceData {
    private boolean alertsFromDishersEnabled;
    
    public static class Builder {
        private boolean alertsFromDishersEnabled = false;
        
        public Builder alertsFromDishersEnabled(boolean alertsFromDishersEnabled) {
            this.alertsFromDishersEnabled = alertsFromDishersEnabled;
            return this;
        }
        
        public PreferenceData build() {
            return new PreferenceData(this);
        }
    }
    
    private PreferenceData(Builder builder) {
        this.alertsFromDishersEnabled = builder.alertsFromDishersEnabled;
    }
    
    public boolean isAlertsFromDishersEnabled() {
        return alertsFromDishersEnabled;
    }
    
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (alertsFromDishersEnabled ? 1231 : 1237);
        return result;
    }
    
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        PreferenceData other = (PreferenceData) obj;
        if (alertsFromDishersEnabled != other.alertsFromDishersEnabled)
            return false;
        return true;
    }
    
    public String toString() {
        StringBuilder builder2 = new StringBuilder();
        builder2.append("PreferenceData [alertsFromDishersEnabled=")
                .append(alertsFromDishersEnabled).append("]");
        return builder2.toString();
    }
}
